//
//  NSData+SubData.m
//  socketIO
//
//  Created by zhao on 8/3/16.
//  Copyright © 2016 le. All rights reserved.
//

#import "NSData+SubData.h"

@implementation NSData (SubData)
- (NSData *) dataFromIndex:(NSInteger)index {
  return [self subdataWithRange:NSMakeRange(index, self.length-index)];
}
- (UInt8) dataAtIndex:(NSInteger)index {
  return ((Byte*)[self bytes])[index];
}
@end
